package com.itheima.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

//@Aspect
//@Component
@Slf4j
public class Aspect5 {


    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        String clazzName = joinPoint.getTarget().getClass().getName();// 获取目标类名
        String name = joinPoint.getSignature().getName();// 获取目标方法签名
        Object[] args = joinPoint.getArgs();// 获取目标方法运行参数
        Object res = joinPoint.proceed();// 执行原始方法，获取返回值（环绕通知）
        return res;
    }
}
